package com.smart.pay.web.service.impl;

import com.smart.pay.api.AliPayService;
import com.smart.pay.web.service.PayService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl implements PayService {
    @DubboReference
    private AliPayService aliPayService;

    @Override
    public String pay(int payType, String orderSn) {
        String payLink = null;
        switch (payType) {
            case 1:
                try {
                    payLink = aliPayService.pay(1, orderSn);
                } catch (Exception ex) {
                }
                break;
            case 2:
                break;
            default:
                break;
        }
        return payLink;
    }
}
